#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<iterator>

int main()
{
    std::string str = "Hello, World!";
    std::vector<unsigned char> vec(str.begin(), str.end());

    // 输出转换后的 vector
    for (const auto& ch : vec) {
        std::cout << ch << ' ';
    }
    std::cout << std::endl;

    unsigned char *p = vec.data();
    for (int i = 0; i < str.size();i++) {
        std::cout << *(p+i) << ' ';
    }
    std::cout << std::endl;

    return 0;
}